text
stringlengths
4
1.02M
meta
dict
from django.conf.urls import url from . import views urlpatterns = [ url( regex=r'^$', view=views.entry, name='business-entry' ), url( regex=r'^log/$', view=views.entry_log, name='business-entry-log' ), url( regex=r'^overview/$', view...
{ "content_hash": "c24aa99542aea1fdc15e1fc677360c9a", "timestamp": "", "source": "github", "line_count": 21, "max_line_length": 33, "avg_line_length": 18.095238095238095, "alnum_prop": 0.5157894736842106, "repo_name": "pterk/django-tcb", "id": "e40c703a7a570857e2842a5957fd6a9d31727426", "size": "380...
PYTHON_VERSION_COMPATIBILITY = "PY3" DEPS = [ 'builder_name_schema', 'depot_tools/bot_update', 'recipe_engine/context', 'recipe_engine/json', 'recipe_engine/path', 'recipe_engine/properties', 'recipe_engine/python', 'recipe_engine/raw_io', 'recipe_engine/step', ]
{ "content_hash": "f46d0deeaa7dc974be129754ee4bab72", "timestamp": "", "source": "github", "line_count": 13, "max_line_length": 36, "avg_line_length": 21.76923076923077, "alnum_prop": 0.6819787985865724, "repo_name": "aosp-mirror/platform_external_skia", "id": "f19553a605b88d6b402f9dddaf8b476a22160f7b...
__requires__ = 'setuptools==0.9.8' import sys from pkg_resources import load_entry_point if __name__ == '__main__': sys.exit( load_entry_point('setuptools==0.9.8', 'console_scripts', 'easy_install-2.7')() )
{ "content_hash": "9027bd893e0f881f10c3ca29a81df69e", "timestamp": "", "source": "github", "line_count": 8, "max_line_length": 86, "avg_line_length": 28, "alnum_prop": 0.6116071428571429, "repo_name": "t-rodynenko/simplequiz", "id": "5424967687b50ef0155b998ea84b658251a763d7", "size": "360", "binar...
from django.db import models class Orderable(models.Model): """ Add extra field and default ordering column for and inline orderable model """ order = models.IntegerField(default=0) class Meta: abstract = True ordering = ('order',)
{ "content_hash": "299b5710490cc1bf605a7116fa67c779", "timestamp": "", "source": "github", "line_count": 13, "max_line_length": 82, "avg_line_length": 22.46153846153846, "alnum_prop": 0.6061643835616438, "repo_name": "marcofucci/django-inline-orderable", "id": "df80f55925016bfddb5f808e923edecfa58d425d...
""" generate_graphs.py ------------------ Generate small synthetic graphs whose complete CLD will be computed. """ import cycles import numpy as np import networkx as nx from numpy import arange def is_valid(graph): """Return whether the graph is valid to run experiments on.""" rank = cycles.fundamental_gr...
{ "content_hash": "84727440c3bba6ab8fef91cfb69a85a1", "timestamp": "", "source": "github", "line_count": 95, "max_line_length": 118, "avg_line_length": 33.02105263157895, "alnum_prop": 0.5773031558814153, "repo_name": "leotrs/graph_homotopy", "id": "b191af64d44ef32bc54ee859144141e877534ae8", "size":...
from distutils.core import setup setup( name='rq_test1', packages=['rq_test1'], version='0.3.0', description='Simple statistical functions implemented in readable Python.', author='Sherif Soliman', author_email='sherif@ssoliman.com', copyright='Copyright (c) 2016 Sherif Soliman',...
{ "content_hash": "568ecb5a7ce5f9f1ed3661a21f1cec35", "timestamp": "", "source": "github", "line_count": 28, "max_line_length": 82, "avg_line_length": 36.07142857142857, "alnum_prop": 0.6108910891089109, "repo_name": "rquirozr/Test-Package2", "id": "9cc7bd9d339432a3e2e9ed3e11c2e4efb6bae1a1", "size":...
"""Provide the device automations for Vacuum.""" from typing import Dict, List import voluptuous as vol from homeassistant.const import ( ATTR_ENTITY_ID, CONF_CONDITION, CONF_DOMAIN, CONF_TYPE, CONF_DEVICE_ID, CONF_ENTITY_ID, ) from homeassistant.core import HomeAssistant from homeassistant.hel...
{ "content_hash": "3d8db337ab42c3c9c7736145281e4ae3", "timestamp": "", "source": "github", "line_count": 79, "max_line_length": 85, "avg_line_length": 31.734177215189874, "alnum_prop": 0.6402074192261668, "repo_name": "joopert/home-assistant", "id": "6a41fe0490e13e79fa78f65ecd8988dd1792c9c6", "size"...
import spotify import threading import json import os import nltk.metrics.agreement import api_keys # Get secret keys KEYS = api_keys.get_keys() logged_in_event = threading.Event() def pretty_print(obj): print json.dumps(obj, sort_keys=True, indent=4, separators=(',',': ')) def connection_state_listener(session): ...
{ "content_hash": "70dbea1ead9603d63be789458c04a54c", "timestamp": "", "source": "github", "line_count": 256, "max_line_length": 82, "avg_line_length": 28.91796875, "alnum_prop": 0.7080913143320275, "repo_name": "willwest/broadwaydb", "id": "059f4e705407fd88b54870e000d121a2011c7e90", "size": "7403",...
import sys from mauto import gui from mauto.api import library def show(): gui.show() def select_repo(): gui.select_repo() def list_macros(): return library.macros.keys() def new_macro(*arg, **kwds): return library.new_macro(*arg, **kwds) def get_macro(name): return library.get(name) de...
{ "content_hash": "f416cb853539322e5df49dace06bf2fd", "timestamp": "", "source": "github", "line_count": 48, "max_line_length": 42, "avg_line_length": 14.416666666666666, "alnum_prop": 0.6257225433526011, "repo_name": "csaez/mauto", "id": "9233f7c2437fb7455f008dd6631a612f6d896ac5", "size": "692", ...
import abc import collections import os import re import shutil import time import netaddr from neutron_lib import constants from neutron_lib import exceptions from oslo_config import cfg from oslo_log import log as logging import oslo_messaging from oslo_utils import excutils from oslo_utils import uuidutils import s...
{ "content_hash": "48cffafd2d1ef9374e0c7443bbb8d5ba", "timestamp": "", "source": "github", "line_count": 1286, "max_line_length": 79, "avg_line_length": 41.052099533437016, "alnum_prop": 0.5495614948951566, "repo_name": "bigswitch/neutron", "id": "ee855dc9acca2ce3d560d74e8550cd4278ff212b", "size": "...
from PythonQt import QtCore, QtGui from director import lcmUtils from director.simpletimer import SimpleTimer from director.timercallback import TimerCallback import subprocess import os import sys class LCMLoggerWidget(object): def __init__(self, statusBar=None): self.manager = lcmUtils.LCMLoggerManager(...
{ "content_hash": "408f95b4b06ac6a10c445888df1a57d4", "timestamp": "", "source": "github", "line_count": 131, "max_line_length": 119, "avg_line_length": 37.80152671755725, "alnum_prop": 0.6453957996768982, "repo_name": "patmarion/director", "id": "838101ffdf62d920116635dde6730232dcdc090e", "size": "...
from __future__ import absolute_import import logging from typing import Any, Dict, List, Set, Tuple, Optional, Text from django.contrib.auth.backends import RemoteUserBackend from django.conf import settings from django.http import HttpResponse import django.contrib.auth from django_auth_ldap.backend import LDAPBac...
{ "content_hash": "d21354776353532ca60d82ede648cad6", "timestamp": "", "source": "github", "line_count": 557, "max_line_length": 114, "avg_line_length": 39.99102333931777, "alnum_prop": 0.6127946127946128, "repo_name": "ryanbackman/zulip", "id": "ac52a7f2ee4df7b6b7e9b3a3b84e79f465b6fdae", "size": "2...
from __future__ import division, print_function import matplotlib matplotlib.use('Agg') from matplotlib import rc import matplotlib.pyplot as plt import pandas as pd def initialize_matplotlib(): inches_per_pt = 1.0 / 72.27 fig_width = 240 * inches_per_pt # width in inches fig_height = 160 * inches_per_p...
{ "content_hash": "96edde13485a09be9d943cf5fd6cc6fe", "timestamp": "", "source": "github", "line_count": 83, "max_line_length": 67, "avg_line_length": 26.457831325301203, "alnum_prop": 0.5655737704918032, "repo_name": "flaviovdf/tribeflow", "id": "f86056c51beecacdac10dd2ecb37a3c7a2ee74f7", "size": "...
import time import fixtures import mock import nova from nova import test from nova.tests import fixtures as nova_fixtures from nova.tests.unit import cast_as_call from nova.tests.unit import policy_fixture from nova.tests.unit.virt.libvirt import fake_libvirt_utils from nova.tests.unit.virt.libvirt import fakelibvir...
{ "content_hash": "09e3b430e052cd881faa98c34c80c139", "timestamp": "", "source": "github", "line_count": 132, "max_line_length": 74, "avg_line_length": 43.378787878787875, "alnum_prop": 0.6105483758295495, "repo_name": "jianghuaw/nova", "id": "df0fb6af7a3e81a3a5165a6df9ec3f92450808e6", "size": "6301...
import sys from libcloud.utils.py3 import httplib from libcloud.utils.py3 import ET from libcloud.common.dimensiondata import DimensionDataAPIException from libcloud.common.types import InvalidCredsError from libcloud.backup.base import BackupTargetJob from libcloud.backup.drivers.dimensiondata import DimensionDataBack...
{ "content_hash": "e2dd54ff9b98d7b7c84aaee0306ce870", "timestamp": "", "source": "github", "line_count": 482, "max_line_length": 154, "avg_line_length": 48.051867219917014, "alnum_prop": 0.6566642200250421, "repo_name": "Kami/libcloud", "id": "13039d4c9c3fc4b5a5b8455345b3dfb8a524d7df", "size": "2394...
""" Copyright 2020 Google LLC Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software d...
{ "content_hash": "6e175d47745b8312f396c0f2a964ef11", "timestamp": "", "source": "github", "line_count": 107, "max_line_length": 168, "avg_line_length": 41.63551401869159, "alnum_prop": 0.7207631874298541, "repo_name": "kartta-labs/noter-backend", "id": "1ffad3cff4511a08e683410821a44fe468a54211", "s...
import subprocess from typing import List import rich_click as click PYTHON_VERSIONS = ["3.7", "3.8", "3.9"] GHCR_IO_PREFIX = "ghcr.io" GHCR_IO_IMAGES = [ "{prefix}/{repo}/{branch}/ci/python{python_version}:latest", "{prefix}/{repo}/{branch}/prod/python{python_version}:latest", ] # noinspection StrFormat...
{ "content_hash": "a2985ce80b7acb21bc45dda59ee6ef03", "timestamp": "", "source": "github", "line_count": 58, "max_line_length": 110, "avg_line_length": 32.8448275862069, "alnum_prop": 0.6409448818897637, "repo_name": "bolkedebruin/airflow", "id": "bcb81c55223f83811ce5dc8c8f06553314c88a0a", "size": "...
from django import forms from . import models class ThoughtForm(forms.ModelForm): class Meta: fields = ('condition', 'notes') model = models.Thought
{ "content_hash": "fdb32d64b2fe5f85c8337a0f535d12c9", "timestamp": "", "source": "github", "line_count": 9, "max_line_length": 39, "avg_line_length": 19, "alnum_prop": 0.6666666666666666, "repo_name": "treehouse/livestream-django-feelings", "id": "a38eb3232e52925c352e40ed085c1b625f609ec2", "size": "...
import pytest import sqlalchemy as sa from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import scoped_session, sessionmaker from cleancat import Integer, Schema, StopValidation, String, ValidationError from cleancat.sqla import SQLAEmbeddedReference, SQLAReference, object_as_dict Base = dec...
{ "content_hash": "b74f75147e5134d22334750466519be5", "timestamp": "", "source": "github", "line_count": 112, "max_line_length": 79, "avg_line_length": 33.669642857142854, "alnum_prop": 0.635905595332803, "repo_name": "closeio/cleancat", "id": "3916bc564c76cf88ce4dbb25a04c99fde1efd255", "size": "377...
from django.conf.urls import patterns, url from django.contrib import admin urlpatterns = patterns('account.views', url(r'^login/$', 'login', name='login'), url(r'^logout/$', 'logout', name='logout'), )
{ "content_hash": "f49ac8c8d2bfc00e31880597368cd25b", "timestamp": "", "source": "github", "line_count": 7, "max_line_length": 47, "avg_line_length": 30.285714285714285, "alnum_prop": 0.6745283018867925, "repo_name": "gdgand/Festi", "id": "42a2d4b05daeaaa1d305580b5b2b63757a28c278", "size": "212", ...
import unittest from vehicle import Vehicle class UtDemo(unittest.TestCase): '''A Unit Test Demo''' def setUp(self): "Create a list of test files" self.time_list=['20120912072912','20120913072230',20120912073312] for f in self.time_list: print f def test_int(self): ...
{ "content_hash": "730f7487ea4d40ff972543d6859e5821", "timestamp": "", "source": "github", "line_count": 20, "max_line_length": 73, "avg_line_length": 24.9, "alnum_prop": 0.6024096385542169, "repo_name": "vollov/py-lab", "id": "a960771067f3064aa34cee6b5f73f7c43b0d9d21", "size": "516", "binary": fa...
from com.android.monkeyrunner import MonkeyRunner, MonkeyDevice # Connects to the current device, returning a MonkeyDevice object device = MonkeyRunner.waitForConnection() # Installs the Android package. Notice that this method returns a boolean, so you can test # to see if the installation worked. device.installPack...
{ "content_hash": "418732af8f97a9a2ab958fb6c523943a", "timestamp": "", "source": "github", "line_count": 30, "max_line_length": 90, "avg_line_length": 30.8, "alnum_prop": 0.7813852813852814, "repo_name": "d53dave/DSLFY-Android", "id": "b9374572e102990fb5735a85b1c956380dcf5865", "size": "980", "bin...
import sys number = 0 while number >= 0: print "Enter number:" number = float(sys.stdin.readline()) if number >= 0: if number % 2 == 0: print "Even" else: print "Odd" print "Bye"
{ "content_hash": "82e55ed33e6b245aa18d90b9fe6c3a65", "timestamp": "", "source": "github", "line_count": 12, "max_line_length": 40, "avg_line_length": 19.333333333333332, "alnum_prop": 0.5129310344827587, "repo_name": "nathano/Perl_to_Python_Converter", "id": "6adfe6c6e9ace17ee4fbdb2e555bacf164d19366"...
""" Snap7 client used for connection to a siemens 7 server. """ import re import logging from ctypes import byref, create_string_buffer, sizeof from ctypes import Array, c_byte, c_char_p, c_int, c_int32, c_uint16, c_ulong, c_void_p from datetime import datetime from typing import List, Optional, Tuple, Union from .com...
{ "content_hash": "c8014c09a10026ef6a60ab84dddf21b5", "timestamp": "", "source": "github", "line_count": 1566, "max_line_length": 142, "avg_line_length": 33.577905491698594, "alnum_prop": 0.5620637848734382, "repo_name": "gijzelaerr/python-snap7", "id": "103d5e553222560b908d12bd0b5935cab020fe73", "s...
from django.forms.models import ModelForm, model_to_dict from moderation.models import MODERATION_STATUS_PENDING,\ MODERATION_STATUS_REJECTED from django.core.exceptions import ObjectDoesNotExist class BaseModeratedObjectForm(ModelForm): def __init__(self, *args, **kwargs): instance = kwargs.get('ins...
{ "content_hash": "f68dac2c244a621c7676c08e9ea49ee8", "timestamp": "", "source": "github", "line_count": 25, "max_line_length": 79, "avg_line_length": 38.8, "alnum_prop": 0.6113402061855671, "repo_name": "ebrelsford/django-moderation", "id": "c352b6d4d92d1064992910fab7f8c068c1bcc264", "size": "970",...
"""Helper classes that list&validate all attributes to serialize to SavedModel.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import abc import six from tensorflow.python.keras.saving.saved_model import json_utils from tensorflow.python.training.track...
{ "content_hash": "4894553db2e3400db1fac952867dc151", "timestamp": "", "source": "github", "line_count": 158, "max_line_length": 100, "avg_line_length": 34.56962025316456, "alnum_prop": 0.7226290735994141, "repo_name": "gunan/tensorflow", "id": "0065e6d786e95bed952abb1ca730c3f3cd19ff56", "size": "61...
import numpy as np import os import sys import matplotlib.pyplot as plt import json from mpl_toolkits.mplot3d import Axes3D #sys.path.append(os.path.join(os.path.dirname(__file__),"../")) from crowdsourcing.interfaces.mechanical_turk import * from crowdsourcing.interfaces.local_webserver import * from crowdsourcing.ut...
{ "content_hash": "f5401d1cf82b1db8149333eb79cd82be", "timestamp": "", "source": "github", "line_count": 70, "max_line_length": 675, "avg_line_length": 73.37142857142857, "alnum_prop": 0.7610981308411215, "repo_name": "sbranson/online_crowdsourcing", "id": "9353ada9e3fba211f9f107c0a3fd4e8811908e3a", ...
"""This application demonstrates how to perform basic operations with the Google Cloud Translate API For more information, the documentation at https://cloud.google.com/translate/docs. """ import argparse from google.cloud import translate import six def detect_language(text): """Detects the text's language.""...
{ "content_hash": "bd15ed9ab28536f5318f5c3b79b14878", "timestamp": "", "source": "github", "line_count": 128, "max_line_length": 79, "avg_line_length": 33.109375, "alnum_prop": 0.6882963662104766, "repo_name": "sharbison3/python-docs-samples", "id": "91aef63d5c849f7a804e892742b330c9f01bb9c3", "size"...
""" Collects Web IDL definitions in IDL files into a Python object per Blink component. Collected IDL definitions are parsed into ASTs and saved into a file with a label of Blink component. """ import optparse import utilities import web_idl from idl_parser import idl_parser from idl_parser import idl_lexer _VALID...
{ "content_hash": "8fe1a96a4840617d3ed484177499ecac", "timestamp": "", "source": "github", "line_count": 65, "max_line_length": 78, "avg_line_length": 28.846153846153847, "alnum_prop": 0.6544, "repo_name": "nwjs/chromium.src", "id": "750304dd2492835f6e3dd81d4720935ff21b54d9", "size": "2037", "bina...
import copy import json import os from datetime import datetime, timedelta from django.conf import settings from django.core import mail import mock import pytest from waffle.testutils import override_switch from olympia import amo from olympia.access.models import Group, GroupUser from olympia.activity.models imp...
{ "content_hash": "39a6cdf315eaf72ad79c36c9a6fb7a7e", "timestamp": "", "source": "github", "line_count": 761, "max_line_length": 79, "avg_line_length": 45.26281208935611, "alnum_prop": 0.636144578313253, "repo_name": "atiqueahmedziad/addons-server", "id": "564194dd4adcf408d5e1a4066ce4e3f718d32b14", ...
""" Molecule images. """ __author__ = "Steven Kearnes" __copyright__ = "Copyright 2014, Stanford University" __license__ = "BSD 3-clause" from rdkit.Chem import Draw from vs_utils.features import Featurizer from vs_utils.utils import image_utils, ob_utils class MolImage(Featurizer): """ Molecule images. ...
{ "content_hash": "f73f15441f4b4d3c8590a025bf703687", "timestamp": "", "source": "github", "line_count": 59, "max_line_length": 75, "avg_line_length": 27.796610169491526, "alnum_prop": 0.5841463414634146, "repo_name": "rbharath/pande-gas", "id": "298b3faab97f255355a47f9439ecdc8cac9e9614", "size": "1...
from django.db import models from django.core.urlresolvers import reverse from django.utils.translation import ugettext_lazy as _ import uuid import os class Entry(models.Model): def get_file_path(instance, filename): ext = filename.split('.')[-1] filename = "%s.%s" % (uuid.uuid4(), ext) ...
{ "content_hash": "b73466ec25183bb31845c1bdff0aefe0", "timestamp": "", "source": "github", "line_count": 37, "max_line_length": 77, "avg_line_length": 36.78378378378378, "alnum_prop": 0.6385011021307861, "repo_name": "klebercode/pmsal", "id": "e5b8e866e930c18a142b42916b67ae5f4a0a4f0e", "size": "1391...
import argparse import numpy as np import sys import queue import uuid import tritonclient.grpc as grpcclient from tritonclient.utils import InferenceServerException FLAGS = None class UserData: def __init__(self): self._completed_requests = queue.Queue() def sync_send(triton_client, result_list, val...
{ "content_hash": "622185862e6bb254c29d73d6f4835719", "timestamp": "", "source": "github", "line_count": 159, "max_line_length": 99, "avg_line_length": 37.522012578616355, "alnum_prop": 0.5439155212872947, "repo_name": "triton-inference-server/client", "id": "68bd15f1b09797748e2a313536e1614d25a0872f",...
from .equals import equals def equals_nocurry_test(): assert equals("foo", "foo") def equals_curry_test(): assert equals("foo")("foo")
{ "content_hash": "d73f0c0fe75ce031796cb4f3d3a96407", "timestamp": "", "source": "github", "line_count": 9, "max_line_length": 31, "avg_line_length": 16.333333333333332, "alnum_prop": 0.6530612244897959, "repo_name": "jackfirth/pyramda", "id": "2cc8d1c17dbe108b15a8c1719e33e84932986290", "size": "147...
from werkzeug.utils import cached_property from flask import json from flask.testing import FlaskClient from .repr import repr_str_short class TestResponseMixin(object): @cached_property def json(self): return json.loads(self.data) @cached_property def content(self): return self.data....
{ "content_hash": "162ae9e387947a80ca750fc8430f0f5b", "timestamp": "", "source": "github", "line_count": 58, "max_line_length": 77, "avg_line_length": 29.5, "alnum_prop": 0.6469900642898889, "repo_name": "vgavro/flask-vgavro-utils", "id": "37245fa1a444389310415d92230eee8ae2abfc44", "size": "1711", ...
import difflib import sys import pgcs.core.data import pgcs.core.diff import pgcs.core.load core = pgcs.core import pgcs.html.diff html = pgcs.html def get_object_name(object): return "%s.%s" % (object.namespace.name, object.get_name()) def get_diff_name(diff): return get_object_name(diff.objects[0]) def _copy_c...
{ "content_hash": "9aeeb767d4bb3aee25a52deffd3edc8f", "timestamp": "", "source": "github", "line_count": 199, "max_line_length": 76, "avg_line_length": 26.814070351758794, "alnum_prop": 0.704272863568216, "repo_name": "somia/pgcs", "id": "0159e28aee588fc8c2ac8045c198cbbc8c0f7f71", "size": "5336", ...
from puzzle.server.settings import BaseConfig def test_BaseConfig(): assert not BaseConfig.DEBUG
{ "content_hash": "8b49ef7f955366303fa946333d2b4125", "timestamp": "", "source": "github", "line_count": 5, "max_line_length": 45, "avg_line_length": 20.6, "alnum_prop": 0.7864077669902912, "repo_name": "robinandeer/puzzle", "id": "395321d448c6f0794439271bff3be236432bd966", "size": "127", "binary"...
import argparse import os import subprocess import shlex import re polly_src_dir = '''@POLLY_SOURCE_DIR@''' polly_lib_dir = '''@POLLY_LIB_DIR@''' shlibext = '''@LLVM_SHLIBEXT@''' llvm_tools_dir = '''@LLVM_TOOLS_DIR@''' link_polly_into_tools = not '''@LINK_POLLY_INTO_TOOLS@'''.lower() in {'','0','n','no','off','false'...
{ "content_hash": "11a373183d30cb59cde05124b8af4c46", "timestamp": "", "source": "github", "line_count": 453, "max_line_length": 231, "avg_line_length": 38.03532008830022, "alnum_prop": 0.5286128845037725, "repo_name": "youtube/cobalt_sandbox", "id": "318fcfe53c9f3f4ce703588bf220df7c2442a800", "size...
import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "abudget.settings.base") from django.core.wsgi import get_wsgi_application application = get_wsgi_application()
{ "content_hash": "af70ad57cae9de9eae862ef8bae54202", "timestamp": "", "source": "github", "line_count": 5, "max_line_length": 72, "avg_line_length": 34.2, "alnum_prop": 0.8011695906432749, "repo_name": "koriaf/django-abudget", "id": "d13cb3b3627616acd1ff8b3dddbe5f374b63c382", "size": "171", "bina...
from django.conf.urls import patterns from views import IndexView urlpatterns = patterns('', (r'^$', IndexView.as_view()), )
{ "content_hash": "e24a551339657d338d3b89c721a6d66a", "timestamp": "", "source": "github", "line_count": 7, "max_line_length": 37, "avg_line_length": 18.714285714285715, "alnum_prop": 0.6946564885496184, "repo_name": "littleq0903/fumoufeed", "id": "2161d4bf92ce7ec668493ab8ea5814b96d16512e", "size": ...
"""Implements vlans, bridges, and iptables rules using linux utilities.""" import calendar import inspect import netaddr import os from nova import db from nova import exception from nova import flags from nova.openstack.common import cfg from nova.openstack.common import importutils from nova.openstack.common import...
{ "content_hash": "1fea03fb65ba6922d9fff22e789bfc48", "timestamp": "", "source": "github", "line_count": 1341, "max_line_length": 79, "avg_line_length": 38.956002982848624, "alnum_prop": 0.5266653905053599, "repo_name": "savi-dev/nova", "id": "f991b36594137307013ed25c8de7d3a42fefe13d", "size": "5307...
"""Tests for tf.keras models using DistributionStrategy.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function from absl.testing import parameterized import numpy as np from tensorflow.contrib.distribute.python import combinations from tensorflow.contrib.distr...
{ "content_hash": "9120081aa40f7d7cd1aea99f49ab237b", "timestamp": "", "source": "github", "line_count": 1057, "max_line_length": 92, "avg_line_length": 38.23084200567644, "alnum_prop": 0.6515466468695867, "repo_name": "apark263/tensorflow", "id": "92de8e643e7588365c23dc8513e197c0869c9ecf", "size": ...
from oslo_log import log as logging from heat.common.i18n import _LE LOG = logging.getLogger(__name__) from zaqarclient.queues.v1 import client as zaqarclient from zaqarclient.transport import errors as zaqar_errors from heat.engine.clients import client_plugin class ZaqarClientPlugin(client_plugin.ClientPlugin):...
{ "content_hash": "acb4085b49c150e479a9e7dccf23dedb", "timestamp": "", "source": "github", "line_count": 46, "max_line_length": 73, "avg_line_length": 28.17391304347826, "alnum_prop": 0.6319444444444444, "repo_name": "srznew/heat", "id": "ba81c4db7a754a09a3f17aee49798774e4ff1514", "size": "1871", ...
from datetime import datetime, date, timedelta import pytest import pytz from icalendar import vRecur from khal.khalendar.event import Event, AllDayEvent, LocalizedEvent, FloatingEvent from .aux import normalize_component, _get_text BERLIN = pytz.timezone('Europe/Berlin') # the lucky people in Bogota don't know t...
{ "content_hash": "ed7fd0298e9ba9113c25cc978d1ef9e2", "timestamp": "", "source": "github", "line_count": 341, "max_line_length": 94, "avg_line_length": 41.225806451612904, "alnum_prop": 0.6650305875657988, "repo_name": "dzoep/khal", "id": "244516a5f34574df13df9516de3e5fddfc1b4ffc", "size": "14078", ...
from module_kits.vtk_kit.mixins import SimpleVTKClassModuleBase import vtk class vtkGeometryFilter(SimpleVTKClassModuleBase): def __init__(self, module_manager): SimpleVTKClassModuleBase.__init__( self, module_manager, vtk.vtkGeometryFilter(), 'Processing.', ('vtkDataSet...
{ "content_hash": "f2d82109a401b84af6e3cf01caef802e", "timestamp": "", "source": "github", "line_count": 11, "max_line_length": 63, "avg_line_length": 38.81818181818182, "alnum_prop": 0.6604215456674473, "repo_name": "fvpolpeta/devide", "id": "93b89ab1e81ac79131098fa293eedfb258120c3b", "size": "488"...
from datetime import datetime from django.test import TestCase from django.contrib.auth.models import User from django.db import IntegrityError from django.core.exceptions import ValidationError from datetime import datetime, timedelta from ..models import Period, Subject from ..testhelper import TestHelper from ..mo...
{ "content_hash": "2e1dcc688318728ae5a73c1e26ec0fae", "timestamp": "", "source": "github", "line_count": 72, "max_line_length": 88, "avg_line_length": 41.958333333333336, "alnum_prop": 0.6550810989738497, "repo_name": "vegarang/devilry-django", "id": "7bde64be0bce64428b9052a109c67e7833208315", "size...
import logging import botocore from kotocore.session import Session log = logging.getLogger(__name__) class KambooConnection(object): """ Kamboo connection with botocore session initialized """ def __init__(self, service_name="ec2", region_name="us-east-1", account_id=None, ...
{ "content_hash": "77473d628fd2951b21aaac1bf875cd0e", "timestamp": "", "source": "github", "line_count": 32, "max_line_length": 79, "avg_line_length": 37.59375, "alnum_prop": 0.5286783042394015, "repo_name": "henrysher/kamboo", "id": "da8566d9519c63c7fc7d8d634174c3c850bb3647", "size": "1784", "bin...
from quicklock import singleton
{ "content_hash": "922b1475ddf99cf2f7f213ec456383ff", "timestamp": "", "source": "github", "line_count": 1, "max_line_length": 31, "avg_line_length": 32, "alnum_prop": 0.875, "repo_name": "NateFerrero/quicklock", "id": "0d9e271c6b3a013c198c081e9d7347da909fac42", "size": "32", "binary": false, "c...
""" Given a linked list, remove the nth node from the end of list and return its head. For example, Given linked list: 1->2->3->4->5, and n = 2. After removing the second node from the end, the linked list becomes 1->2->3->5. Note: Given n will always be valid. Try to do this in one pass. """ __aut...
{ "content_hash": "904d99197e9df29ab7460d4764e2e7e5", "timestamp": "", "source": "github", "line_count": 53, "max_line_length": 83, "avg_line_length": 23.943396226415093, "alnum_prop": 0.4980299448384555, "repo_name": "algorhythms/LeetCode", "id": "41529a7bd2c40f1bb47863031dffc9d358a8a34b", "size": ...
from __future__ import absolute_import, division, print_function, unicode_literals from amaascore.core.amaas_model import AMaaSModel class Reference(AMaaSModel): def __init__(self, reference_value, reference_primary=False, *args, **kwargs): self.reference_value = reference_value self.reference_p...
{ "content_hash": "4ace5ff3b2a714086b8ec9350ab36eaa", "timestamp": "", "source": "github", "line_count": 24, "max_line_length": 82, "avg_line_length": 33.333333333333336, "alnum_prop": 0.66375, "repo_name": "amaas-fintech/amaas-core-sdk-python", "id": "f34efe6aecbc3f1613edb3fce4c434b317c8d8a0", "siz...
import argparse import json import os import re import urllib.request _REPO_URL = 'https://repo.maven.apache.org/maven2' _GROUP_NAME = 'io/grpc' _MODULE_NAME = 'grpc-core' _FILE_EXT = 'jar' _OVERRIDE_LATEST = None _PATCH_VERSION = 'cr1' def do_latest(): if _OVERRIDE_LATEST is not None: print(_OVERRIDE_LA...
{ "content_hash": "036263d1b02d446af0d86c44705143e7", "timestamp": "", "source": "github", "line_count": 70, "max_line_length": 79, "avg_line_length": 31.285714285714285, "alnum_prop": 0.5917808219178082, "repo_name": "chromium/chromium", "id": "132cdd2b52bc56ef6598638b8d00f47236b49620", "size": "24...
import datetime import decimal import uuid from functools import lru_cache from itertools import chain from django.conf import settings from django.core.exceptions import FieldError from django.db import DatabaseError, NotSupportedError, models from django.db.backends.base.operations import BaseDatabaseOperations from...
{ "content_hash": "1f88bdf59f612f53c123b9945245e625", "timestamp": "", "source": "github", "line_count": 436, "max_line_length": 88, "avg_line_length": 39.0848623853211, "alnum_prop": 0.5788979519981222, "repo_name": "auvipy/django", "id": "7c7cfce1ba045408aeb698f040928a0fc8b46e84", "size": "17041",...
"""Definition of the PhraseElement class and associated subclasses: - NounPhraseElement - AdjectivePhraseElement - VerbPhraseElement - ClausePhraseElement """ import six from .base import NLGElement from .string import StringElement from .word import WordElement from ..util import get_phrase_helper from ..lexicon.f...
{ "content_hash": "1565b6fea4b52a958f1e7ecc9481e08f", "timestamp": "", "source": "github", "line_count": 244, "max_line_length": 88, "avg_line_length": 35.454918032786885, "alnum_prop": 0.6534504681539707, "repo_name": "brouberol/pynlg", "id": "54cd8559984922f71866949f4f7d5cf822e84086", "size": "867...
from __future__ import print_function import jupyter_client import sys import threading import time from concurrent import futures import grpc import ipython_pb2 import ipython_pb2_grpc _ONE_DAY_IN_SECONDS = 60 * 60 * 24 is_py2 = sys.version[0] == '2' if is_py2: import Queue as queue else: import queue as ...
{ "content_hash": "fb9ca424d405ffceb62fd0c88b69b923", "timestamp": "", "source": "github", "line_count": 141, "max_line_length": 92, "avg_line_length": 36.97872340425532, "alnum_prop": 0.5237821250479479, "repo_name": "vipul1409/zeppelin", "id": "98fa616c2d034d52e73e1be1af06389fdcd0d3fb", "size": "5...
import mock from nose.tools import eq_ from django import forms import amo.tests from files.utils import WebAppParser class TestWebAppParser(amo.tests.TestCase): @mock.patch('files.utils.WebAppParser.get_json_data') def test_no_developer_name(self, get_json_data): get_json_data.return_value = { ...
{ "content_hash": "367ab33c7947f16d279e723383aca727", "timestamp": "", "source": "github", "line_count": 103, "max_line_length": 79, "avg_line_length": 40.19417475728155, "alnum_prop": 0.5285024154589372, "repo_name": "spasovski/zamboni", "id": "2c60fdff0cd58dff66b744142e762942b1661579", "size": "41...
""" SeqFindr BLAST methods """ import subprocess import shutil import os import sys from Bio.Blast import NCBIXML from Bio.Blast.Applications import NcbiblastnCommandline from Bio.Blast.Applications import NcbitblastnCommandline from Bio.Blast.Applications import NcbitblastxCommandline import SeqFindr.util def mak...
{ "content_hash": "c443b56cb0b8225b5f7620c82200a77f", "timestamp": "", "source": "github", "line_count": 170, "max_line_length": 142, "avg_line_length": 41.194117647058825, "alnum_prop": 0.5740396972725974, "repo_name": "nbenzakour/SeqFindR", "id": "57341478e01f8b5f18350e77602568877dabfa6a", "size":...
from __future__ import absolute_import from traits.api import List, Str, HasTraits, Float, Int # =============standard library imports ======================== from numpy import random, char import time # =============local library imports ========================== from pychron.hardware.gauges.base_controller impor...
{ "content_hash": "333cca1c5e5718c8173106421dbef65d", "timestamp": "", "source": "github", "line_count": 131, "max_line_length": 97, "avg_line_length": 28.671755725190838, "alnum_prop": 0.5332800851970181, "repo_name": "UManPychron/pychron", "id": "2cea69e0db6cd4bd09e2dca6fedda43d106aa17a", "size": ...
from __future__ import unicode_literals, division, absolute_import from difflib import SequenceMatcher import logging import re import urllib import requests from sqlalchemy import Table, Column, Integer, String, Unicode, Boolean, func from sqlalchemy.orm import relation from sqlalchemy.schema import ForeignKey from ...
{ "content_hash": "581b8fe9051d4ae87553acc22536da66", "timestamp": "", "source": "github", "line_count": 300, "max_line_length": 116, "avg_line_length": 40.89333333333333, "alnum_prop": 0.5841212911640039, "repo_name": "voriux/Flexget", "id": "cc95851925484ee131e00806c713eec4d20d03f4", "size": "1226...
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals # Module API def check_required(constraint, value): if not (constraint and value is None): return True return False
{ "content_hash": "0345ce3353c73e8c3e9c6652eefd893e", "timestamp": "", "source": "github", "line_count": 12, "max_line_length": 42, "avg_line_length": 23.666666666666668, "alnum_prop": 0.7183098591549296, "repo_name": "okfn/jsontableschema-py", "id": "c164388dd86443558e614f31a139047c4f9e1e67", "size...
from paasta_tools.autoscaling import cluster_boost from paasta_tools.cli.utils import execute_paasta_cluster_boost_on_remote_master from paasta_tools.cli.utils import lazy_choices_completer from paasta_tools.utils import DEFAULT_SOA_DIR from paasta_tools.utils import list_clusters from paasta_tools.utils import load_sy...
{ "content_hash": "de6f0b25a7d3656b688b9054e91eb8e8", "timestamp": "", "source": "github", "line_count": 107, "max_line_length": 103, "avg_line_length": 37.822429906542055, "alnum_prop": 0.6209537929330368, "repo_name": "somic/paasta", "id": "3d51c2fbbd2dbb713de05e33044727eabf9105e4", "size": "4647"...
from django.contrib.auth.models import AnonymousUser from django.db import models from django.db.models.aggregates import Count from polymorphic.manager import PolymorphicManager from shop.order_signals import processing from shop.util.compat.db import atomic #========================================================...
{ "content_hash": "409fcf52d7744c0909425d5391a25753", "timestamp": "", "source": "github", "line_count": 162, "max_line_length": 79, "avg_line_length": 36.141975308641975, "alnum_prop": 0.5772843723313408, "repo_name": "febsn/django-shop", "id": "134033087bdaba26d39dd2d265e396aaa47d798e", "size": "5...
import mockups from datetime import datetime from django.contrib.auth.models import User, UNUSABLE_PASSWORD from mockups import Mockup, Factory from mockups import generators class UserFactory(Factory): username = generators.UUIDGenerator(max_length=30) first_name = generators.LoremWordGenerator(1) last_n...
{ "content_hash": "69275feeae0c368909d2d645413af9f2", "timestamp": "", "source": "github", "line_count": 77, "max_line_length": 79, "avg_line_length": 40.103896103896105, "alnum_prop": 0.6716321243523317, "repo_name": "sorl/django-mockups", "id": "3dc64993e062fc1ffa705163bbc407aa838989d8", "size": "...
""" This module provies an interface to the Elastic MapReduce (EMR) service from AWS. """ from boto.emr.connection import EmrConnection from boto.emr.step import Step, StreamingStep, JarStep from boto.emr.bootstrap_action import BootstrapAction from boto.regioninfo import RegionInfo, get_regions from boto.regioninfo im...
{ "content_hash": "a0378f24b974b293ff6239860b31341b", "timestamp": "", "source": "github", "line_count": 24, "max_line_length": 72, "avg_line_length": 31.375, "alnum_prop": 0.7410358565737052, "repo_name": "xq262144/hue", "id": "dfa53c7337195e9d7ff07c5124d6130b28aa4cf9", "size": "1963", "binary": ...
import os from collections import defaultdict from .smb_utils import smb_connect, get_netbios_name, NameError from smb.base import SharedDevice DEFAULT_TIMEOUT = 30 DEFAULT_SHARE = 'data' class IfcbConnectionError(Exception): pass def do_nothing(*args, **kw): pass class RemoteIfcb(object): def __init_...
{ "content_hash": "ae8b7173cfc845dfc3495c866c982732", "timestamp": "", "source": "github", "line_count": 138, "max_line_length": 107, "avg_line_length": 36, "alnum_prop": 0.5489130434782609, "repo_name": "joefutrelle/pyifcb", "id": "0c37ea582882e6065887aeec5c9a54eeaf1ac60d", "size": "4968", "binar...
import hassapi as hass import globals # # App to send notification when door opened or closed # # Args: # # sensor: sensor to monitor e.g. input_binary.hall # # Release Notes # # Version 1.0: # Initial Version class DoorNotification(hass.Hass): def initialize(self): if "sensor" in self.args: ...
{ "content_hash": "13a323a4821dcedf6eff673c8c4cbc91", "timestamp": "", "source": "github", "line_count": 31, "max_line_length": 94, "avg_line_length": 27.70967741935484, "alnum_prop": 0.6123399301513388, "repo_name": "acockburn/appdaemon", "id": "90c00182e0eda9c5000fef827c9ad91ce04397f5", "size": "8...
from __future__ import unicode_literals from django.db import models, migrations import datetime class Migration(migrations.Migration): dependencies = [ ('post', '0001_initial'), ] operations = [ migrations.AlterField( model_name='post', name='start_date', ...
{ "content_hash": "589174c5a97f9faf298cb15913af80d1", "timestamp": "", "source": "github", "line_count": 19, "max_line_length": 161, "avg_line_length": 25.94736842105263, "alnum_prop": 0.6247464503042597, "repo_name": "jualjiman/blog-django-campus", "id": "82682484eb817da068361e99e7880924dc1ffc18", ...
""" byceps.services.language.dbmodels ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2014-2022 Jochen Kupperschmidt :License: Revised BSD (see `LICENSE` file for details) """ from ...database import db class Language(db.Model): """A language. The code can be just `en` or `de`, but also `en-gb` or `de-de`. ...
{ "content_hash": "e869741247b6a9a4ddab8af5ecba9639", "timestamp": "", "source": "github", "line_count": 23, "max_line_length": 67, "avg_line_length": 21.08695652173913, "alnum_prop": 0.5896907216494846, "repo_name": "homeworkprod/byceps", "id": "b1a5af39c0c0286f4f8f602cffa1ac039740555e", "size": "4...
import logging from ..all_steps.event_handler import EventHandler as TopEventHandler from ..step1.data_handler import DataHandler from ..step1.plot import Step1Plot from .gui_handler import Step3GuiHandler from ..utilities.retrieve_data_infos import RetrieveGeneralDataInfos from .. import DataType class EventHandl...
{ "content_hash": "a12c7503bd8f9c671dcfdb715fa0d028", "timestamp": "", "source": "github", "line_count": 64, "max_line_length": 111, "avg_line_length": 41.015625, "alnum_prop": 0.6659047619047619, "repo_name": "ornlneutronimaging/iBeatles", "id": "0fa72a9db3db8d1802704853782149ee9f8523a1", "size": "...
import glob import os import re import sys import tempfile from oslo_config import cfg BASE_DIR = os.path.dirname(os.path.abspath(__file__)) ROOT = os.path.abspath(os.path.join(BASE_DIR, "..", "..")) CONTRIB_DIR = os.path.join(ROOT, 'contrib') PLUGIN_DIRS = glob.glob(os.path.join(CONTRIB_DIR, '*')) ENV_DIR = os.path....
{ "content_hash": "993c9954d7be1dfa2e02549fedc9921f", "timestamp": "", "source": "github", "line_count": 410, "max_line_length": 79, "avg_line_length": 35.47560975609756, "alnum_prop": 0.6167755242351324, "repo_name": "rdo-management/heat", "id": "f57621c7c45c7faa98eb211f232d782e85c9460c", "size": "...
import json import pika import sys from datetime import datetime, timedelta import string import random class Client: """ Client application to the GRACC Request daemons """ def __init__(self, exchange, routing_key, url="amqp://guest:guest@localhost/"): """ Initialization functio...
{ "content_hash": "153edf0d42d83a850f822bafa4036563", "timestamp": "", "source": "github", "line_count": 177, "max_line_length": 128, "avg_line_length": 40.175141242937855, "alnum_prop": 0.6049782027844185, "repo_name": "shreyb/gracc-request", "id": "9327dda961cf92e1e7d9ff0a6b54ea1c472311e4", "size"...
from __future__ import absolute_import, with_statement from mock import Mock, patch from nose.tools import * import parse from behave import matchers, model, runner class DummyMatcher(matchers.Matcher): desired_result = None def check_match(self, step): return DummyMatcher.desired_result class Test...
{ "content_hash": "ef61178e916fc3f81268c63ca0845ae1", "timestamp": "", "source": "github", "line_count": 183, "max_line_length": 80, "avg_line_length": 34.87431693989071, "alnum_prop": 0.5636164211845817, "repo_name": "charleswhchan/behave", "id": "5a2d940e2b44cab3278f9b09ccc69c0760ce07cc", "size": ...
from curious import deferred_to_real from django.test import TestCase, override_settings from django.db import connection from curious_tests.models import Blog, Entry class TestDeferredToReal(TestCase): def setUp(self): blog = Blog(name='Databases') blog.save() self.blogs = [blog] headlines = ('MyS...
{ "content_hash": "0efb17f2a9fccced6ce3de3bd4b65629", "timestamp": "", "source": "github", "line_count": 66, "max_line_length": 90, "avg_line_length": 39.28787878787879, "alnum_prop": 0.6826070188970305, "repo_name": "ginkgobioworks/curious", "id": "4b62ede549f3ff2bccb53acb732957c238474626", "size":...
""" The main QuerySet implementation. This provides the public API for the ORM. """ import copy import sys import warnings from collections import OrderedDict, deque from django.conf import settings from django.core import exceptions from django.db import ( DJANGO_VERSION_PICKLE_KEY, IntegrityError, connections, ...
{ "content_hash": "e9cba6bd699037dad36dbf7092d6ee18", "timestamp": "", "source": "github", "line_count": 1769, "max_line_length": 115, "avg_line_length": 40.351611079706046, "alnum_prop": 0.587473032417136, "repo_name": "indevgr/django", "id": "61c52167c7465d54070b2ebf57aae8ca1da5a40b", "size": "713...
""" homeassistant.components.notify.pushover ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Pushover platform for notify component. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/notify.pushover/ """ import logging from homeassistant.helpers import validate_c...
{ "content_hash": "e5078800d58a98785697cdc0fa3cb519", "timestamp": "", "source": "github", "line_count": 59, "max_line_length": 77, "avg_line_length": 31.88135593220339, "alnum_prop": 0.6331738437001595, "repo_name": "badele/home-assistant", "id": "7c776300cdb2bfb5dc83fe75591b3a48fd54c742", "size": ...
import logging.config import os from alembic import context from sqlalchemy import create_engine, pool def run_migrations_offline(): """Run migrations in 'offline' mode. This configures the context with just a URL and not an Engine, though an Engine is acceptable here as well. By skipping the Engin...
{ "content_hash": "cf72f5114c85d3953a0801fa6bcaca7e", "timestamp": "", "source": "github", "line_count": 53, "max_line_length": 64, "avg_line_length": 24.88679245283019, "alnum_prop": 0.6808188021228203, "repo_name": "xsnippet/xsnippet-api", "id": "f9161656e8eadb779b7b28e44a727646f0c84b9f", "size": ...
""" HDBSCAN: Hierarchical Density-Based Spatial Clustering of Applications with Noise """ import numpy as np from sklearn.base import BaseEstimator, ClusterMixin from sklearn.metrics import pairwise_distances from scipy.sparse import issparse from sklearn.neighbors import KDTree, BallTree from joblib import ...
{ "content_hash": "0c0169dc0cb5b31fa989ab665a826b1d", "timestamp": "", "source": "github", "line_count": 1524, "max_line_length": 115, "avg_line_length": 38.02690288713911, "alnum_prop": 0.6160681931910341, "repo_name": "scikit-learn-contrib/hdbscan", "id": "ce0092d04e6b868365c4b8957b766dbc288e366d", ...
import aquarium from trace_parser import cmp_events_by_timestamp class DeleteBreakdown(object): def __init__(self, start_ev): self._start_ts = start_ev._timestamp self._seqnum = start_ev._arg self._events = [ start_ev ] @property def seqnum(self): return self._seqnum @...
{ "content_hash": "9cd0ebb02798858cc25b4f0021e60e04", "timestamp": "", "source": "github", "line_count": 153, "max_line_length": 98, "avg_line_length": 42.64705882352941, "alnum_prop": 0.5474329501915709, "repo_name": "kishoredbn/barrelfish", "id": "43b65e177a10858cc61210d8d19eb238c22ce31f", "size":...
import unittest import tempfile import uuid as _uuid import pathlib import io from qiime2.core.testing.type import IntSequence1 from qiime2.core.testing.format import IntSequenceDirectoryFormat from qiime2.core.archive.archiver import _ZipArchive, ArchiveRecord from qiime2.core.archive.format.v0 import ArchiveFormat ...
{ "content_hash": "1f9f4b344f7575f1c715da6ff18d631d", "timestamp": "", "source": "github", "line_count": 55, "max_line_length": 79, "avg_line_length": 35.6, "alnum_prop": 0.6087844739530133, "repo_name": "ebolyen/qiime2", "id": "59cf949c22f5d4d391e8358bb1988c2a7e2f5d48", "size": "2307", "binary": ...
import logging import urllib import uuid from collections import defaultdict from copy import copy from dataclasses import dataclass, field from typing import Callable, Dict, List, Optional, Set, Union, cast, overload import requests from typing_extensions import Literal, Protocol import mbq.metrics from .. import S...
{ "content_hash": "323a2bcfa697d265bca3f124f7147167", "timestamp": "", "source": "github", "line_count": 607, "max_line_length": 95, "avg_line_length": 34.634266886326195, "alnum_prop": 0.5796508585834562, "repo_name": "managedbyq/mbq.client", "id": "a79de208d40f0e27c637b8f19bd19f78fe03a90b", "size"...
from nose.tools import assert_raises, raises from rx import Observable, Observer from rx.testing import TestScheduler, ReactiveTest, is_prime, MockDisposable from rx.disposables import Disposable, SerialDisposable from rx.subjects import AsyncSubject from rx.internal.exceptions import DisposedException on_next = Reac...
{ "content_hash": "7d413451e427f4a9b43dc62856931b3b", "timestamp": "", "source": "github", "line_count": 410, "max_line_length": 76, "avg_line_length": 30.148780487804878, "alnum_prop": 0.6677453280478926, "repo_name": "Reactive-Extensions/RxPy", "id": "c9d7c08a2b87463cc06e8d7a527884f58e80c23f", "si...
from http.client import responses import hashlib from tornado import web, gen from jupyterhub.services.auth import HubOAuthenticated from remoteappmanager.logging.logging_mixin import LoggingMixin from remoteappmanager.handlers.handler_authenticator import HubAuthenticator class BaseHandler(HubOAuthenticated, web....
{ "content_hash": "4873d602ea54fd1232a94e5f77a4e398", "timestamp": "", "source": "github", "line_count": 91, "max_line_length": 78, "avg_line_length": 34.92307692307692, "alnum_prop": 0.6145374449339207, "repo_name": "simphony/simphony-remote", "id": "75db87c983037d0a6d8937d0f756d309c41f9f30", "size...
import socket import threading from django.core.handlers.wsgi import WSGIHandler from django.core.servers import basehttp from django.test.testcases import TransactionTestCase from django.core.management import call_command class StoppableWSGIServer(basehttp.WSGIServer): """WSGIServer with short timeout, so that ...
{ "content_hash": "3eface23d87b823b9eef1445b8a6ec80", "timestamp": "", "source": "github", "line_count": 81, "max_line_length": 95, "avg_line_length": 37.135802469135804, "alnum_prop": 0.6313164893617021, "repo_name": "akvo/django-tastypie", "id": "bd434f217b81963eadf4723db645bcce318a58d5", "size": ...
"""Application configuration.""" import os class Config(object): """Base configuration.""" SECRET_KEY = os.environ.get('FLASKAPP_SECRET', 'secret-key') # TODO: Change me APP_DIR = os.path.abspath(os.path.dirname(__file__)) # This directory PROJECT_ROOT = os.path.abspath(os.path.join(APP_DIR, os.par...
{ "content_hash": "60138a52f0ce3eb2678ccce4d318b764", "timestamp": "", "source": "github", "line_count": 50, "max_line_length": 110, "avg_line_length": 33.3, "alnum_prop": 0.6648648648648648, "repo_name": "xuxian94/flaskapp", "id": "a959a438838e82c2ab65816b8baa004a18ff1f14", "size": "1689", "binar...
import praw import prawcore import os def reddit_login(): '''logs in the user using OAuth 2.0 and returns a redditor object for use''' user_agent = 'PC:redditFavoriteGrab:v0.1 (by /u/Scien)' r = praw.Reddit('mysettings', user_agent=user_agent) try: return r.user.me() except prawcore.excepti...
{ "content_hash": "9a88cc9e52eb8ac11a02f95f78d6597b", "timestamp": "", "source": "github", "line_count": 55, "max_line_length": 124, "avg_line_length": 34, "alnum_prop": 0.6395721925133689, "repo_name": "mmmvdb/redditFavoriteGrab", "id": "1f733b187bb513700aad4cfa13114d1a2a48143c", "size": "1870", ...
from google.cloud import dialogflow_v2 def sample_get_conversation(): # Create a client client = dialogflow_v2.ConversationsClient() # Initialize request argument(s) request = dialogflow_v2.GetConversationRequest( name="name_value", ) # Make the request response = client.get_conv...
{ "content_hash": "6dd18d717b2053777e0a522de857f253", "timestamp": "", "source": "github", "line_count": 19, "max_line_length": 77, "avg_line_length": 24.842105263157894, "alnum_prop": 0.7203389830508474, "repo_name": "googleapis/python-dialogflow", "id": "04fa5f4d5e743d9272d22a8a772d5609398037bf", ...
from .OAuth2Util import OAuth2Util
{ "content_hash": "b6c1bcc1877cf83ba3e4360d72360431", "timestamp": "", "source": "github", "line_count": 1, "max_line_length": 34, "avg_line_length": 35, "alnum_prop": 0.8571428571428571, "repo_name": "13steinj/praw-OAuth2Util", "id": "3f5ea3bd7a9326e06c831bbf69f70bcfef31a61c", "size": "35", "bina...
''' This script uses Pattern's sentiment analysis to find the average polarity and subjectivity of collected tweets about presidential candidates by Ziyu (Selina) Wang last modified: September 28, 2015 ''' from pattern.en import * # Importing Patern to be utilized later # Creating a list with all the candidates names c...
{ "content_hash": "db3c9d642e44bf6f0ef4e67ac6936376", "timestamp": "", "source": "github", "line_count": 40, "max_line_length": 318, "avg_line_length": 51.15, "alnum_prop": 0.7512218963831867, "repo_name": "SelinaWang/SoftwareDesignFall15", "id": "5ad565c71687952a494cdb8a9cd41d18485f13a2", "size": "...
import os import shutil from nipype.interfaces.base import (traits, BaseInterfaceInputSpec, TraitedSpec, BaseInterface, File, Directory) class CopyInputSpec(BaseInterfaceInputSpec): in_file = traits.Either(File, Directory, exists=True, mandat...
{ "content_hash": "42b56648ac3a4ce54d81187b34006daa", "timestamp": "", "source": "github", "line_count": 71, "max_line_length": 74, "avg_line_length": 34.54929577464789, "alnum_prop": 0.566245413779046, "repo_name": "ohsu-qin/qipipe", "id": "132acafc2eca4544a688ccddeaf3be4deb39e894", "size": "2453",...
""" Module for performing checks on a Kibana logging deployment """ import json import ssl try: from urllib2 import HTTPError, URLError import urllib2 except ImportError: from urllib.error import HTTPError, URLError import urllib.request as urllib2 from openshift_checks.logging.logging import Logging...
{ "content_hash": "68cf8b728a550d5292238d1af3b18ad2", "timestamp": "", "source": "github", "line_count": 220, "max_line_length": 102, "avg_line_length": 39.86363636363637, "alnum_prop": 0.5689851767388826, "repo_name": "rhdedgar/openshift-tools", "id": "efb14ab423dafc431ce546d0a75525817e2b45af", "si...
import sys sys.path.insert(1, "../../") import h2o def runif_check(ip, port): # Connect to a pre-existing cluster uploaded_frame = h2o.upload_file(h2o.locate("bigdata/laptop/mnist/train.csv.gz")) r_u = uploaded_frame[0].runif(1234) imported_frame = h2o.import_file(h2o.locate("bigdata/laptop/mnis...
{ "content_hash": "3a85717732a1d81ca91e6921dafbac91", "timestamp": "", "source": "github", "line_count": 19, "max_line_length": 115, "avg_line_length": 34.8421052631579, "alnum_prop": 0.6676737160120846, "repo_name": "PawarPawan/h2o-v3", "id": "e8bdc9c80053d009e53171d94b8b51a68a7577e5", "size": "662...
from PIL import Image, ImageDraw DirectionNames = [ 'North', 'West', 'South', 'East' ] SpriteDir = "sprites" def CreateAtlas( sheetName, default, sprite_size, atlas_size, directionalAnimations, manualAnimations ): print( "Building: " + sheetName ) maxWidth = atlas_size[0] maxHeight = atlas_size[1] spriteWidth = ...
{ "content_hash": "debaac6f3dfdb3b10c282bbeaf97fe7c", "timestamp": "", "source": "github", "line_count": 131, "max_line_length": 104, "avg_line_length": 31.786259541984734, "alnum_prop": 0.627281460134486, "repo_name": "smacdo/Dungeon-Crawler", "id": "93f94897b82216c4750b8a49c94d8b427ff9c91f", "size...
""" Lädt die Favoriten eines Users @author Markus Tacker <m@coderbyheart.de> """ import vertx import mutex import time from com.xhaus.jyson import JysonCodec as json from oauth import Consumer from core.event_bus import EventBus from util import parse_date from datetime import datetime, timedelta config = vertx.confi...
{ "content_hash": "705ddba3a5923096b01a445b3e3123b6", "timestamp": "", "source": "github", "line_count": 38, "max_line_length": 228, "avg_line_length": 35.39473684210526, "alnum_prop": 0.6877323420074349, "repo_name": "Gruenderhub/twitter-autocurator", "id": "e4afe5569213796864584f2909392f11c057e54f",...
"""Tests for soft sorting tensorflow layers.""" import tensorflow.compat.v2 as tf from soft_sort.matrix_factorization import data class DataTest(tf.test.TestCase): def setUp(self): super().setUp() tf.random.set_seed(0) self._data = data.SyntheticData( num_features=50, num_individuals=200, low_...
{ "content_hash": "4ca98cf90a9536918d2a92cb7fc854f0", "timestamp": "", "source": "github", "line_count": 23, "max_line_length": 58, "avg_line_length": 21.869565217391305, "alnum_prop": 0.6660039761431411, "repo_name": "google-research/google-research", "id": "52f354944ced07bd04e12c0d9723a1cf6c1b81d3",...
""" Ironic console utilities. """ import errno import os import psutil import signal import subprocess import time from ironic_lib import utils as ironic_utils from oslo_concurrency import processutils from oslo_config import cfg from oslo_log import log as logging from oslo_service import loopingcall from oslo_utils...
{ "content_hash": "0ce4780dd8560846ef2afb20d9cc65e2", "timestamp": "", "source": "github", "line_count": 259, "max_line_length": 79, "avg_line_length": 34.810810810810814, "alnum_prop": 0.5929458740017747, "repo_name": "dims/ironic", "id": "ca1a4e4b3d43716354e8a9df808eaddee637d68f", "size": "9691", ...
""" Offset Codebook (OCB) mode. OCB is Authenticated Encryption with Associated Data (AEAD) cipher mode designed by Prof. Phillip Rogaway and specified in `RFC7253`_. The algorithm provides both authenticity and privacy, it is very efficient, it uses only one key and it can be used in online mode (so that en...
{ "content_hash": "73bd4e0655e650cf25619ba93ece2238", "timestamp": "", "source": "github", "line_count": 486, "max_line_length": 80, "avg_line_length": 37.62139917695473, "alnum_prop": 0.5229162108947714, "repo_name": "chronicwaffle/PokemonGo-DesktopMap", "id": "f40871dbef3da83f15d951df73c6c25981303c8...
"""Runtime type checking support. For internal use only; no backwards-compatibility guarantees. """ import collections import inspect import sys import types from apache_beam.pvalue import TaggedOutput from apache_beam.transforms.core import DoFn from apache_beam.transforms.window import WindowedValue from apache_be...
{ "content_hash": "9065e85b3c6bdcde370e4fe8a90b58b2", "timestamp": "", "source": "github", "line_count": 163, "max_line_length": 79, "avg_line_length": 37.34969325153374, "alnum_prop": 0.683311432325887, "repo_name": "yk5/beam", "id": "89a5f5c7e2cf2366d15e9bd8b86c31d0aa932395", "size": "6873", "bi...
__doc__=""" Jumps to next instance shown in the preview field of the current Edit tab. """ import GlyphsApp Doc = Glyphs.currentDocument numberOfInstances = len( Glyphs.font.instances ) try: currentInstanceNumber = Doc.windowController().activeEditViewController().selectedInstance() if currentInstanceNumber > 1:...
{ "content_hash": "89fe8d56ef4fa320c649d724008889ef", "timestamp": "", "source": "github", "line_count": 20, "max_line_length": 101, "avg_line_length": 28.4, "alnum_prop": 0.778169014084507, "repo_name": "weiweihuanghuang/Glyphs-Scripts", "id": "a8e9a22dd7e4490086352a77b12c21d5241d82b6", "size": "62...
from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException from thrift.protocol.TProtocol import TProtocolException from thrift.TRecursive import fix_spec import sys import logging from .ttypes import * from thrift.Thrift import TProcessor from thrift.transport import TTransport all_...
{ "content_hash": "f3db21c802fa6a579f24167da8b4c06b", "timestamp": "", "source": "github", "line_count": 284, "max_line_length": 134, "avg_line_length": 34.186619718309856, "alnum_prop": 0.5742094963435987, "repo_name": "hmcl/storm-apache", "id": "4d91b1d9f0034bf7ca971e96172b4609d753a053", "size": "...
__import__('pkg_resources').declare_namespace(__name__)
{ "content_hash": "96b57b75f83745a044136090e8240b5e", "timestamp": "", "source": "github", "line_count": 1, "max_line_length": 55, "avg_line_length": 56, "alnum_prop": 0.6785714285714286, "repo_name": "projectmallard/mallard-ducktype", "id": "1e3a4b538ce599fc6293990aab46ba932e88d34b", "size": "1168"...
# -*- coding: utf-8 -*- # Copyright 2013 Takeshi KOMIYA # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
{ "content_hash": "94f3f931a270e562793eb4ad8d9e0ac3", "timestamp": "", "source": "github", "line_count": 186, "max_line_length": 99, "avg_line_length": 37.93010752688172, "alnum_prop": 0.6215450035435861, "repo_name": "tk0miya/testing.elasticsearch", "id": "f658fe3df72fd1048c6cad5c16eae1c59468ee1a", ...